<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
<h1 id="visitorId"></h1>
<script>
    // Initialize the agent at application startup.
    const fpPromise = import('https://openfpcdn.io/fingerprintjs/v3').then(FingerprintJS => FingerprintJS.load())
    
    // Get the visitor identifier when you need it.
    fpPromise.then(fp => fp.get()).then(result => {
        // This is the visitor identifier:
        const visitorId = result.visitorId
        document.querySelector('#visitorId').innerHTML = visitorId;
    })
</script>
</body>
</html>